<%= stylesheet('bootstrap','style','reg-login')%>
<div id="main">
  <%if @user.errors.any?%>
    <div class="alert alert-error">
      <button type="button" class="close" data-dismiss="alert">&times;</button>
      <ul>
         <% @user.errors.full_messages.each do |msg| %>
      <li>* <%= msg%></li>
        <%end %>
      </ul>
    </div>
    <script type="text/javascript">
    $(function(){
      setTimeout(function(){
        $(".alert").alert('close')
      },10000)
    })
    </script>
<% end %>

  <div  class="container">
    <div class="comm-form">
      <h2 class="title">用户注册</h2>
      <%= form_for @user, :html => { :class => "form-horizontal"} do |f| %>
        <div class="control-group">
          <label class="control-label" >Email</label>
          <div class="controls">
            <%= f.text_field :email,:class => 'input-large' %>
            <p class="help-block">填写你常用的Email邮箱地址作为登录帐号</p>
          </div>
        </div>
        <div class="control-group">
          <label class="control-label" >您的昵称</label>
          <div class="controls">
            <%= f.text_field :nickname,:class => 'input-large' %>
            <p class="help-block">该怎么称呼你？3-10个字符</p>
          </div>
        </div>
        <div class="control-group">
          <label class="control-label" >设置密码</label>
          <div class="controls">
            <%= f.password_field :password,:class => 'input-large' %>
            <p class="help-block">密码长度为6-14位</p>
          </div>
        </div>
        <div class="control-group">
          <label class="control-label" >确认密码</label>
          <div class="controls">
            <%= f.password_field :password_confirmation,:class => 'input-large' %>
          </div>
        </div>
       <!--  <div class="control-group">
            <div class="controls">
                    <label class="checkbox">
                      <input type="checkbox"  name="agreement" checked>
              我已阅读并接受《<a target="_blank" href="/info/agreement">使用协议</a>》
                    </label>
                </div>
              </div> -->

              <div class="controls">
                <button class="btn btn-success" type="submit">提交</button>
              </div>
      <% end %>
    </div>
  </div>
</div>